package com.example.qiehuanactivity;

import java.util.ArrayList;
import java.util.List;

import com.example.android.navigationdrawerexample.R;

import android.app.Activity;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.widget.LinearLayout;

public class SB3_DownView extends Activity{

	LinearLayout linearLayout_Sb2_down1 = null;
	LinearLayout linearLayout_Sb2_down2 = null;
	LinearLayout linearLayout_Sb2_down3 = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.workout_statistic_sb3_down_guo);
		List<Integer> list3 = new ArrayList<Integer>();
		int listnum3[] = { 25, 18, 45, 18, 38, 38, 45, 18, 9, 45, 55,
				69, 55, 60, 72, 67, 12, 38, 69, 49, 49, 85, 80, 19, 48, 19, 18 };
		for (int i = 0; i < 27; i++) {
			list3.add(listnum3[i]);
		}
		

		List<Integer> list_number = new ArrayList<Integer>();
		list_number.add(482);
		list_number.add(27);
		list_number.add(7);
		
		DisplayMetrics dm = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(dm);
		int screenWidth = dm.widthPixels;
		int screenHeigh = dm.heightPixels;
		List<String> name_1 = new ArrayList<String>();
		name_1.add("50");
		name_1.add("40");
		name_1.add("30");
		name_1.add("20");
		name_1.add("10");
		name_1.add("Time");
		linearLayout_Sb2_down1 = (LinearLayout)findViewById(R.id.linearLayout_Sb2_down1);
		linearLayout_Sb2_down1.addView(new RedLineBarView2(SB3_DownView.this, screenWidth, screenHeigh, 0, list3, name_1 ,list_number));
		List<Integer> list = new ArrayList<Integer>();
		List<Integer> list1 = new ArrayList<Integer>();
		int listnum[] = {55,60,70,75,70,60,70,70,80,60,65,67,65,60};
		int listnum2[] = {40,42,40,45,42,44,41,40,35,30,30,28,25,25}; 
    	for(int i = 0; i < 14; i++) {
    		list.add(listnum[i]);
    		list1.add(listnum2[i]);
    	}
    	List<String> name_2 = new ArrayList<String>();
		name_2.add("80");
		name_2.add("60");
		name_2.add("40");
		name_2.add("20");
		name_2.add("20");
		name_2.add("Time");
    	linearLayout_Sb2_down2 = (LinearLayout)findViewById(R.id.linearLayout_Sb2_down2);
		linearLayout_Sb2_down2.addView(new TwoLineView(SB3_DownView.this, screenWidth, screenHeigh,0,list,list1,name_2, list_number));
		List<Integer> list4 = new ArrayList<Integer>();
		List<Integer> list5 = new ArrayList<Integer>();
		int listnum4[] = {90,91,90,91,90,89,90,91,91,90,90,91,92,91,90,90,91,90};
		int listnum5[] = {60,43,60,62,61,60,60,61,61,32,38,36,40,60,61,62,38,38}; 
		for(int i = 0; i < 18; i++) {
    		list4.add(listnum4[i]);
    		list5.add(listnum5[i]);
    	}
		List<String> name_3 = new ArrayList<String>();
		name_3.add("2.0m");
		name_3.add("1.6");
		name_3.add("1.2");
		name_3.add("0.8");
		name_3.add("0.4");
		name_3.add("Time");
		linearLayout_Sb2_down3 = (LinearLayout)findViewById(R.id.linearLayout_Sb2_down3);
		linearLayout_Sb2_down3.addView(new RedandBlueLineView(SB3_DownView.this, screenWidth, screenHeigh,0,list4,list5,name_3, list_number));
		
	}
	
	
}
